<?php
// +----------------------------------------------------------------------
// | 登录验证
// +----------------------------------------------------------------------
namespace app\admin\validate;
use think\Validate;

class SystemUser extends Validate
{

    //定义验证规则
    protected $rule =   [
        'user_name|用户名称' => 'require',
        'user_code|用户编码' => 'unique:system_user',
    ];
    
    protected $message  =   [
        'user_name.require' => '用户名称必填',
        'user_code.require'  => '用户编码必填',
        'user_code.unique'  => '用户编码已存在',
    ];
    
    protected $scene = [
        'edit'  =>  ['name','age'],
    ];    

}
